1. Field of the Invention
The present invention relates to bus management. In particular, the present invention relates to an arbitration and fairness protocol on a serial bus system.
2. The Prior Art
Modern electronic equipment has greatly enhanced the quality of our lives. However, as the use of such equipment has increased, so has the need to connect equipment purchased from different manufacturers. For example, while a computer and a digital camera may each be useful when used alone, the ability to connect the digital camera to the computer and exchange information between the two makes the combination even more useful. Therefore, a need was apparent for a serial bus standard that would allow for the connection and communication between such devices.
The IEEE 1394-1995 standard was developed to satisfy this need. This standard revolutionized the consumer electronics industry by providing a serial bus management system that featured high speeds and the ability to xe2x80x9chotxe2x80x9d connect equipment to the bus; that is, the ability to connect equipment without first turning off the existing connected equipment. Since its adoption, the IEEE 1394-1995 standard has begun to see acceptance in the marketplace with many major electronics and computer manufacturers providing IEEE 1394 connections on equipment that they sell.
However, as technologies improved, the need to update the IEEE 1394 standard became apparent. Two new standards are being proposed at the time of the filing of this application, herein referred to as the proposed IEEE 1394a, or P1394a standard, and the proposed IEEE 1394b, or P1394b standard. Improvements such as higher speeds and longer connection paths will be provided.
One area that has been improved is in the way that bus arbitration takes place on the bus. Arbitration is the process by which a device desiring to send data over the bus gains control of the bus in order to transfer the data.
FIG. 1 shows a prior art example of a typical data stream 100 during arbitration on a IEEE 1394-1995 compliant bus. In FIG. 1, data flow is generally from left to right on the page.
According to the IEEE 1394-1995 standard, the bus is required to remain idle for some predetermined time prior to arbitration. This period is known as either the arbitration reset gap or the subaction gap, as represented by packet 102. After this gap 102, an arbitration request 104 (xe2x80x9carbxe2x80x9d) may be sent by the device wishing to send data over the bus. If arbitration is granted, then data packet 10 may be sent. After some idle time represented by packet 108, an acknowledgment packet 110 (xe2x80x9cackxe2x80x9d) is sent by the receiving device, and the bus is returned to idle in packet 112.
FIG. 2 shows an example of prior art tree and root arrangement of node on an IEEE 1394-1995 compliant bus. As is appreciated by one skilled in the art, on a bus compliant with the IEEE 1394-1995 standard, when devices are connected together, a Tree-ID process takes place that results in one node being designated as the root, and all others being designated as branch and leaf nodes developing from the root node. Accordingly, in FIG. 2, node #4 has been designated the root node, and nodes #0, #1 and #2 are leaf nodes, and node #3 is a branch node. As is known by one skilled in the art, nodes #1 and #2 are referred to as xe2x80x9cchildxe2x80x9d nodes of the xe2x80x9cparentxe2x80x9d node #3, and nodes #0 and #3 are referred to as the xe2x80x9cchildxe2x80x9d nodes of the xe2x80x9cparentxe2x80x9d node #4.
FIGS. 3A through 3D shows a prior art example of how the packets shown in FIG. 1 might propagate in the tree arrangement shown in FIG. 2 during a request for arbitration. FIG. 3A shows nodes #1 and #2 requesting arbitration at the same time. As is known by one skilled in the art, nodes along the path to the root arbitrate with their respective parents, while the root node makes the final decision. Therefore, a parent node will pass along a request to its parent, while denying access to its other children. Accordingly, FIG. 3B shows node #3 passing along node #2""s request to the root node #4, while node #3 denies access to its other child node # 1. Likewise, root node #4 has received node #0""s request, and denies access to node #3.
In FIG. 3C, root node #4 will acknowledge node #0""s first-received request by sending a grant to node #0. Node #0 will then withdraw its request.
In FIG. 3D, nodes #2 and #3 will withdraw their requests, having both received denies. Thus, node #0 has now won arbitration, and may begin sending data over the bus.
As is appreciated by one skilled in the art, the process shown in FIGS. 3A-3D has certain drawbacks. First, since in the IEEE 1394-1995 standard packet transmission between nodes is not full duplex (unlike arbitration signals, which are full duplex), packet transmission between nodes may only occur in one direction at a time. This limitation results in the fact that arbitration requests may not be communicated while data packets are being transmitted.
More importantly for the purposes of the present invention, the process shown in FIGS. 3A-3D demonstrates that for node #2 to arbitrate for control of the bus, its request must be routed through node #3 to be decided by root node #4 and travel back down again to be received. Furthermore, as mentioned above, the arbitration process as carried out in the IEEE 1394-1995 standard requires that some period of idle bus (either an arbitration reset or subaction gap) occur before arbitration can begin again. As is appreciated by one skilled in the art, the larger the tree grows, the longer the path the farthest leaf node""s request must travel, and the slower the entire process gets. Finally, while an arbitration reset or subaction gap is occurring, no data may be sent, resulting in inefficiencies.
The IEEE 1394-1995 standard also includes a concept known as fairness. Fairness is a procedure whereby all nodes that wish to gain control of the bus get at least one shot to arbitrate within a given period.
FIG. 4 shows an example of the prior art fairness procedure. In FIG. 4, nodes A, B, and C all wish to arbitrate within time period 400. This time period is known as a fairness interval. For each node A, B, and C, a waveform representing the node""s respective arbitration_enable flag is shown along a time axis. As is known by one skilled in the art, in order for an arbitration fairness period to begin, the bus must be idle for an arbitration reset gap. On FIG. 4, this period is show between time marker 402 and time marker 404.
As is known by one skilled in the art, after the arbitration reset gap is over, the arbitration_enable flag is set for nodes A, B, and C at time marker 404. This is indicated in FIG. 4 by the waveforms labeled node A, B, and C each going high at time marker 404. According to the IEEE 1394-1995 standard, a node""s arbitration_enable flag will remain high until the node has won arbitration of the bus, then the arbitration enable flag will be reset low.
This process is shown in FIG. 4 first with node A. At time marker 404, node A begins to arbitrate, and at time marker 406, node A wins arbitration. Accordingly, node A""s arbitration_enable flag is reset low, and node A is allowed to transmit data on the bus. When node A has finished transmitting, the bus goes idle at time maker 408 and after a shorter period of idle (the subaction gap) all nodes with their arbitration_enable flag set are permitted to arbitrate for the bus at time marker 410. In the case illustrated, node B wins arbitration at time marker 412, has its arbitration_enable flag reset low, and By transmits data. Finally, the bus goes idle for a subaction gap once again, and since no other node is arbitrating, node C wins arbitration at time marker 414, has its arbitration_enable flag set low, and transmits data until time marker 416.
Referring still to FIG. 4, after node C is done transmitting data at time marker 416, the bus stays idle for another arbitration reset gap between time markers 416 and 418 because none of the nodes A, B or C are allowed to arbitrate since all their arbitration_enable flags are reset. Once the arbitration reset gap has occurred at time marker 418, the arbitration_enable flags of all nodes are set, and they can once again arbitrate for control of the bus.
As is appreciated by one skilled in the art, the arbitration fairness procedure shown in FIG. 4 ensures that all nodes which wish control of the bus are queued up and taken in an orderly fashion.
The arbitration process and fairness procedure described above are satisfactory so long as the round trip time it takes to send and receive the arbitration request packet is relatively small compared to the length of the packet itself. As is known by one skilled in the art, this is usually the case in an IEEE 1394-1995 compliant bus.
However, the P1394b standard presents improvements that will reveal limitations in the arbitration process just described. For example, the P1394b standard is much faster and capable of much longer runs. As speeds increase, the present need for subaction and arbitration reset gaps make the current standard inefficient.
A new way of arbitrating was introduced into the P1394b standard that allowed arbitration to take place in parallel with data transmission, thus taking advantage of P1394b""s full-duplex capabilities.
FIG. 5 shows an example of this process. As is known by one skilled in the art, one major innovation in P1394b was the elimination of the fixed bus master at the root node. Instead, in P1394b, the bus master is located at the node that last transmitted; in other words, the bus master node xe2x80x98floatsxe2x80x99 in P1394b. Thus, in FIG. 5, since node #0 is transmitting data, node #0 is the bus master. In P1394b, the current bus master is known as the Bus Owner/Supervisor/Selector, or the BOSS, and makes the final arbitration decision.
In general, there is no reverse path to an arbitrary node. However, since the BOSS node is transmitting, it is the one node has a free return path from all other nodes. To take advantage of this free path arbitration requests are routed back to the BOSS node in P1394b.
Therefore, in FIG. 5 while data is being transmitted outward from the BOSS node, requests are being streamed inward to the BOSS node. As is appreciated by one skilled in the art, this will result in an improvement in efficiency when compared to the original 1394-1995 standard since the BOSS node will be able to determine which direction to send a grant while it is still sending data, and can send the grant immediately after it is completed sending.
Additionally, a new fairness protocol has been proposed. The proposal includes a provision for requesting nodes to issue either a xe2x80x98currentxe2x80x99 or xe2x80x98nextxe2x80x99 request, depending on the node""s status.
FIG. 6 shows the proposed fairness protocol as a flow chart.
The process starts with each requesting node sending an arbitration request. However, two types of requests are now permitted. In FIG. 6, query 600 asks whether the requesting node""s arbitration_enable bit is set. If it is, then the node can send out a Current request as shown in act 602. If the requesting node""s bit is not set, then the node must send out a Next request as shown in act 604.
Referring still to the protocol of FIG. 6, Current requests have priority over Next requests. Therefore, in act 606, the BOSS node will first service all of the Current requests that have worked their way up the tree (all intermediate nodes only pass on the highest request, so that a Next request will only be forwarded if there are no Current requests). When all of the Current requests have been drained, then the BOSS node will issue an arbitration reset in act 608. At this point, an arbitration timer is set in act 610. This timer is needed to prevent a race condition, as will be explained shortly.
After an arbitration reset is sent down the tree, all Next requests are renamed to Current requests in act 612. In P1394b, this may be performed on the fly locally at each node.
Referring still to FIG. 6, the BOSS will now begin to service the renamed Current requests that will appear in act 614. At this point, the function of the timer becomes important. As mentioned in act 612 above, the renaming of Next requests to Current requests occurs on the fly. This process may lead to a race condition, where nodes that are close to the BOSS node are renamed and serviced quickly, while nodes much farther down the tree may not have seen the arbitration reset from the BOSS yet, and therefore have not had their Next requests renamed to Current requests yet. To prevent the situation where a BOSS node re-issues another arbitration reset before a distant node has been serviced from occurring, the timer in act 610 is set to wait for a predetermined time to allow distant nodes to xe2x80x9ccatch upxe2x80x9d. This predetermined time is set to either be the worst case round trip time based upon the tree structure, or the time is set by the structure performing a self-test to determine the actual round trip time through the tree. The latter method has been implemented in the P1394a standard.
Referring still to FIG. 6, in act 614, the BOSS node now waits for the pre-determined amount of time set in act 610 to expire. Once that happens, the BOSS may issue another arbitration reset in act 616.
As is appreciated by one skilled in the art, the renaming of requests is not good practice since it is possible for requests to be in transit (actually on the wire and not stored in a node) and various other timeouts need to be added to handle these requests.
Hence, there is a need for an arbitration and fairness protocol for a full-duplex bus that eliminates the requirement for these extra timeouts and the need for the renaming of arbitration requests.
The invention satisfies the above needs. The present invention relates to bus management. In particular, the present invention relates to an arbitration and fairness protocol on a serial bus system.
One preferred embodiment includes the acts of: providing a first arbitration phase, a second arbitration phase, and an arbitration advancing means; sending an arbitration reset command for the first arbitration phase by the BOSS node; granting arbitration by the BOSS node of arbitration requests made by the plurality of nodes for the first arbitration phase during the second arbitration phase; granting arbitration by the BOSS node of arbitration requests made by the plurality of nodes for the first arbitration phase during the first arbitration phase; advancing to the second arbitration phase according to the advancing means; sending an arbitration reset command for the second arbitration phase by the BOSS node; granting arbitration by the BOSS node of arbitration requests made by the plurality of nodes for the second arbitration phase during the first arbitration phase; and granting arbitration by the BOSS node of arbitration requests made by the plurality of nodes for the second arbitration phase during the second arbitration phase.
Another embodiment is disclosed, which includes the following acts: providing a current arbitration phase and an inactive arbitration phase, determining whether one of the plurality of nodes wishes to arbitrate on the full-duplex communications system; if one of the nodes wishes to arbitrate, determining further whether the arbitration indicator within the node is set; sending an arbitration request on the full-duplex communications system for the active arbitration phase by the node if the arbitration indicator is set; sending an arbitration request on the full-duplex communications system for the inactive arbitration phase by the node if the arbitration indicator is reset; and sending an arbitration denial for the current arbitration phase if the node does not wish to arbitrate.
Another embodiment is disclosed, which includes the acts of: providing a current arbitration phase and an inactive arbitration phase; determining whether one of the plurality of nodes wishes to arbitrate on the full-duplex communications system; if one of the nodes wishes to arbitrate, sending an arbitration request on the full-duplex communications system for the active arbitration phase by the node if the arbitration indicator is set; and sending an arbitration denial request on the full-duplex communications system for the current arbitration phase if the node does not wish to arbitrate.
Another method is disclosed that operates when communication on the bus occurs in both an asynchronous and isochronous comprising the acts of: servicing isochronous arbitration requests first; and servicing asynchronous arbitration requests second.
A machine readable medium containing a data structure for arbitrating on a high performance serial bus is disclosed, which comprises an arbitration phase indicator having an indication therein for indicating a plurality of arbitration phases.
A machine readable medium containing a data structure for providing access to arbitration on a high performance serial bus is disclosed, which comprises an arbitration phase indicator having an indication therein for indicating a desire to arbitrate within one of a plurality of arbitration phases.
A machine readable data transmission containing a data structure for arbitrating on a high performance serial bus is disclosed, which comprises a portion therein for indicating a plurality of arbitration phases.
A machine readable data transmission containing a data structure for providing access to arbitration on a high performance serial bus, which comprises a portion therein for indicating a desire to arbitrate within one of a plurality of arbitration phases.